import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/prizePool/queryPage',
    method: 'post',
    data
  })
}

export function queryPageResource(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/ticketRecord/queryPage',
    method: 'post',
    data
  })
}
/**
 * 查询详情
 * @param {*} id
 */
export function get(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/prizePool/get',
    method: 'get',
    params: { id }
  })
}

/**
 * 添加
 * @param {*} data
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/prizePool/insert',
    method: 'post',
    data
  })
}

/**
 * 编辑
 * @param {*} data
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/prizePool/update',
    method: 'post',
    data
  })
}

/**
 * 编辑状态
 * @param {*} data
 */
export function updatestatus(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/prizePool/updateStatus',
    method: 'post',
    data
  })
}
/**
 * 删除
 * @param {*} id
 */
 export function deletes(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/ticketRecord/deleteById',
    method: 'get',
    params: { id }
  })
}
/**
 * 删除
 * @param {*} id
 */
export function del(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/prizePool/deleteById',
    method: 'get',
    params: { id }
  })
}
export function getRech(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/recharge/getRechargePrize',
    method: 'post',
    data
  })
 }
 export function getRechOne(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/recharge/getOneList',
    method: 'post',
    data
  })
 }
